<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>确认订单</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath() %>/resources/css/shop.css">
</head>
<body>
    <div id="orderaddr">
        <p>暂无收货地址</p>
    </div>
    <div class="goods">
        <table class="table table-bordered">
            <tr>
                <td colspan="2">
                    <div class="pull-left">
                        <strong>购物清单</strong>
                    </div>
                    <div class="pull-right">
                        <small>共${totalnum}件&nbsp;&nbsp;￥${totalprice}</small>
                    </div>
                </td>
            </tr>
            <c:forEach items="${orderDtos}" var="orderDto">
            <tr>
                <td class="cartimg">
                    <img src="<%=request.getContextPath() %>/resources/images/goodsImages/${orderDto.goodsImg}" alt="">
                </td>
                <td>
                    <p><strong>${orderDto.goodsName}</strong></p>
                    <p class="price">￥${orderDto.price}</p>
                    <p><small>数量：${orderDto.quantity}</small></p>
                </td>
            </tr>
            </c:forEach>
            <tr>
                <td colspan="2">
                    <div class="pull-left">
                        <strong>运送方式</strong>
                    </div>
                    <div class="pull-right">
                        <small>免运费</small>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="pull-left">
                        <strong>支付方式</strong>
                    </div>
                    <div class="pull-right">
                        <small>在线支付</small>
                    </div>
                </td>
            </tr>
        </table>
        <div class="container">
            <form method="post" action="addOrder">
                <button id="orderSubmit" class="btn btn-danger btn-block">提交订单</button>
            </form>
        </div>
    </div>
<script src="<%=request.getContextPath() %>/resources/js/jquery-1.11.2.min.js"></script>
<script src="<%=request.getContextPath() %>/resources/js/bootstrap.min.js"></script>
<script type="text/javascript">
    $("#orderSubmit").submit();
</script>
</body>
</html>